package com.wyf.config;

import com.wyf.dao.AccountDao;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

// 将当前类声明为一个配置类
@Configuration
// 设置扫描包范围
@ComponentScan("com.wyf")
public class IocConfig {
    // 返回实例化单例Bean对象
    @Bean
    public AccountDao accountDao() {
        return new AccountDao();
    }
}
